package com.boot2.core.model.dto;

import lombok.Data;

import java.io.Serializable;


/**
 * 
 * @ClassName: AbstractMqttMessage.java
 * @description: mqtt消息
 * @author zhangweilin
 * @date 2018年1月8日 下午5:56:31
 *
 */
@Data
public class MqttMessage<T> implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5211729890633999554L;

	private String api;

	/**
	 * 错误代码，0为成功,
	 */
	private Integer errCode;   
	
	/**
	 * 版本号从1.0开始
	 */
	private String version;   
	
	/**
	 * 时间戳
	 */
	private long t;

	/**
	 * 结果
	 */
	private T result;

	public MqttMessage() {
	}

	public MqttMessage(String api, Integer errCode, String version, long t, T result) {
		super();
		this.api = api;
		this.errCode = errCode;
		this.version = version;
		this.t = t;
		this.result = result;
	}

}
